function OS_Image(host,id)
{
	this.$super=OS_Resource;
	if (this.$super(host,id)===false) return;
	delete this.$super;
	
	var image=new Image();
	
	this.load=function(handler)
	{
		var src=this.resourceNode.getElementsByTagName("link")[0].childNodes[0].nodeValue;
		var instance=this;
		image.onload=function(){
			instance.loaded=true;
			handler(instance);
		};
		image.src=src;
	}
	
	this.getImage=function()
	{
		return image;
	}
}

OS_Resource.Builder.put("image",OS_Image);
